import request from '@/utils/request'

// 获取省市区
export function addressUnitList() {
    return request({
        url: '/wvp/addressUnit/streetList',
        method: 'post',
        data: {}
    })
}

export function statistics(params = {}) {
    return request({
        url: '/wvp/communityEventCount/statistics',
        method: 'post',
        data: params
    })
}

export function listByDate(month, params = {}) {
    return request({
        url: '/wvp/communityEventCount/listByDate',
        method: 'post',
        data: Object.assign({}, params, {month})
    })
}

export function listAllSurveillance(params = {}) {
    return request({
        url: '/wvp/surveillance/listAll',
        method: 'post',
        data: {
            areaCodeHome: params.area,
            streetCodeHome: params.street,
        }
    })
}


export function listDutyCountByDate(countTimeStr, params = {}) {
    return request({
        url: '/wvp/count/queryByDate',
        method: 'post',
        data: Object.assign({}, params, {countTimeStr})
    })
}
